<template>
  <div class="right-chart-2" :class="tre?'classnames': ''">
    <dv-scroll-board :config="config" style="width:98%;height:100%;" />
    <!-- <div class="rc-detail" v-if="stationPerson">
      <dv-scroll-board :config="config" />

      <div class="rcd-item">
        <p>人员呼叫信息</p>
        <span>{{stationPerson.workshop_leader_tel}}</span>
      </div>
      <div class="rcd-item">
        <p>车间负责人</p>
        <span>{{stationPerson.workshop_leader}}</span>
      </div>
      <div class="rcd-item">
        <p>操作员</p>
        <span>{{stationPerson.station_operator}}</span>
      </div>
      <div class="rcd-item">
        <p>维修员</p>
        <span>{{stationPerson.station_maintenance_man}}</span>
      </div>

    </div> -->
    <dv-decoration-10 style="height:1px;width:100%;margin:3% 0 0" />
  </div>
</template>

<script>
import {stationPerson} from '@/network/home'
let config = {
  header:['职位','名字','电话'],
  data:[],
  index: true,
  columnWidth: [50],
  align: ['center'],
  waitTime: 12000,
  rowNum:2,
  headerHeight:40,
}
export default {
  name: "RightChart2",
  props: ["tre","stationId"],
  data() {
    return {
      config:{}
      // stationPerson:{
      //   station_id:'',//工站表id
      //   workshop_leader:'',//车间负责人
      //   workshop_leader_tel:'',//车间负责人联系电话
      //   station_operator:'',//工站操作员
      //   station_operator_tel:'',//工站操作员电话
      //   station_maintenance_man:'',//维修员
      //   station_maintenance_man_tel:'',
      // },
      
    }
  },
  mounted() {
    this.getStationPerson()
  },
  watch:{
    stationId: function(){
      if(this.stationId > 0 ) this.getStationPerson()
    }
  },
  methods: {
    getStationPerson(){
      stationPerson({stationId:this.stationId}).then(res => {
        let data = res.data.data || [];
        if(data.length < 1) return;
        let {info} = data[0];
        console.log('info1111',info);
        config.data = info;
        this.$nextTick(()=>{
          this.config = config
        })

        
        // this.stationPerson = data;
        // data.forEach(el => {
        //   this.workshop_leader = el.workshop_leader;
        //   this.workshop_leader_tel = el.workshop_leader_tel;
        //   this.station_operator = el.station_operator;
        //   this.station_maintenance_man = el.station_maintenance_man;
        // });        
      })
    }
  }
}
</script>

<style lang="less">
.right-chart-2 {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  flex-grow: 0;

  /* .rc-detail {
    padding: 0 13%;
    box-sizing: border-box;

    .rcd-item {
      height: 36px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      p,
      span {
        width: 100%;
        text-align: left;
      }
      p {
        margin: 0;
      }
      span {
        text-indent: 20px;
      }
    }
  }
  .rc-station {
    height: 40%;
  } */
  // .dv-scroll-board {
  //     height: calc(~"100% - 120px");
  //   }
  
}
</style>